/***
 * @description axios封装
 * @file api.ts
 * @author andy
 * @date 2024/3/22 16:40
 */
// file:api.s
// 1、导入axios以及拦截器
import service from "./request";

// demo接口1
export const demo1 = (data: any) => {
  return service({
    url: "/user/user/demo1/" + data,
    method: "post",
  });
};

// demo接口2
export const demo2 = (data: any) => {
  return service({
    url: "/user/user/demo2",
    method: "post",
    data,
  });
};
// 拼团列表
export const groupActiveList = (data: any) => {
  return service({
    url: "/team/team/groupActiveList",
    method: "post",
    data,
  });
};

export const deleteGroupActive = (activeId: any) => {
  return service({
    url: "/team/team/deleteGroupActive/" + activeId,
    method: "post",
  });
};

// 添加拼团
export const addGroupActive = (data: any) => {
  return service({
    url: "/team/team/addGroupActive",
    method: "post",
    data,
  });
};

// 修改拼团
export const updateGroupActive = (data: any) => {
  return service({
    url: "/team/team/updateGroupActive",
    method: "post",
    data,
  });
};

// 商家拼团活动
export const groupJoinList = (data: any) => {
  return service({
    url: "/team/team/groupJoinList",
    method: "post",
    data,
  });
};

// 商家参与活动
export const addGroupJoin = (data: any) => {
  return service({
    url: "/team/team/addGroupJoin",
    method: "post",
    data,
  });
};

export const deleteGroupJoin = (joinId: any) => {
  return service({
    url: "/team/team/deleteGroupJoin/" + joinId,
    method: "post",
  });
};
